import styled, { ThemeProvider } from "styled-components";
// Define our button
import React, { useCallback, useState } from "react";
class MyComponent extends React.Component {
  render() {
    // 必须把样式组件通过props传入的类名设置给组件的标签，才能使添加的样式生效
    return <div className={`${this.props.className} ml-3 pt-5`}>{this.props.children}</div>;
  }
}

const AddStyle = styled(MyComponent)`
    background-color: #555;
    
`
const NoStyles = ()=>{
    return <>
    <MyComponent>使用base.scss文件中的样式</MyComponent>
    <AddStyle>使用base.scss文件中的样式+样式组件提供的样式</AddStyle>
    </>
};
export default NoStyles;
